<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <include file="public@head" />

</head>
<body>
<include file="public@nav" />

<div class="center cirWrapper clearfix">
    <include file="public@messnav" />
    <div class="an_right_wra fr">
        <h3>福利</h3>
        <ul class="wf_list">
        </ul>
    </div>
</div>

<include file="public@footer" />
<include file="public@scripts" />
<script type="text/javascript" src="__TMPL__public/assets/js/message.js"></script>
<script>
    headerMove(6);
    $(function(){
        var obtain_param = {
            url:'Records/obtain',
            data:{
                page:1

            }
        };
        $.JsonRpc(obtain_param,function(data){
            if(data.data.num==0){
                var null_html = '<p class="null-tips-wrap">当前没有数据</p>';
                $(null_html).appendTo(".an_right_wra");
                return false;
            }
            data = data.data.list;
            var tpl = "";
            $.each(data,function(i){
                (data[i].o_type == 10)?(liClassName="gm_wra",pClassName=""):(liClassName="gm_wra",pClassName="");
                var gift_creat_time = String(data[i].o_createtime).slice(0,10).split("-");
                if(data[i].o_type == 10){
                    tpl +=
                        '<li class="gm_wra">'+
                        '<div>'+
                        '<h4 class="gm_amount">'+data[i].g_sponsor+'元红包</h4>'+
                        '<p>'+data[i].g_sponsor+'L币，已存入你的账户</p>'+
                        '</div>'+
                        '<div class="last_item">'+
                        '<h4 class="gm_amount">'+data[i].s_name+'</h4>'+
                        '<p>'+data[i].o_createtime.slice(0,16).replace(/-/g,".").replace(/ /g,"-")+'</p>'+
                        '</div>'+
                        '</li>';
                }else if(data[i].o_type == 20){
                    var get_gift_txt;
                    if(data[i].g_status==30){
                        get_gift_txt = "未领取"
                    }else if(data[i].g_status==40){
                        get_gift_txt = "已领取"
                    }
                    tpl +=
                        '<li class="gp_wra">'+
                            '<div>'+
                                '<h4 class="gm_amount">'+data[i].g_name+'</h4>'+
                                '<p>电子码：'+data[i].g_number+'</p>'+
                                '<p>密码：'+data[i].g_password+'</p>'+
                            '</div>'+
                            '<div>'+
                                '<h4 class="gm_amount">'+data[i].s_name+'</h4>'+
                                '<p>'+data[i].o_createtime.slice(0,16).replace(/-/g,".").replace(/ /g,"-")+'</p>'+
                            '</div>'+
                            '<div class="last_item">'+
                                '<h5 class="info_receive">关于领取</h5>'+
                                '<p>领取日期：'+data[i].o_createtime.slice(0,10).replace(/-/g,".")+'-'+data[i].g_edittime.slice(0,10).replace(/-/g,".")+'</p>'+
                                '<p>领取商家：'+data[i].g_sponsor+'</p>'+
                                '<p>咨询电话：<span class="font-blue">'+data[i].g_phone+'</span></p>'+
                                '<p class="font-red">请于有效期内凭电子码及密码到指定商家领取，逾期视为自动放弃</p>'+
                                '<span class="get-gift-mark">'+get_gift_txt+'</span>'+
                        '</div>'+
                        '</li>';
                }
            });
            $(".wf_list").html(tpl);
        });
    });
</script>
</body>
</html>


























